<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <h:body>
        <ui:composition template="WEB-INF/template/master.xhtml">

            <ui:define name="header">
                <div data-role="header" data-theme="a" data-position="inline">
                    <h1 align="center">Setup (2 von 3)</h1>
                </div>
            </ui:define>

            <ui:define name="content">
                <div data-role="content" data-theme="a">

                    <!--writing URL Parameter in Bean -->
                    <f:view contentType="text/html">

                        <f:metadata>
                            <f:viewParam name="courseid" value="#{timetableBean.courseid}" />
                        </f:metadata>
                    </f:view>

                    <!--Merke IDCookie für Captcha-->
                    #{timetableBean.generateCaptchaIDCookie()}


                    <h2 align="center">Bitte wählen Sie das Semester</h2>

                    <ui:repeat var="Semester" value="#{timetableBean.getSemesterCollectionbyCourseofstudy()}">

                        <a href="overview.xhtml?semester=#{Semester.getIdsemester()}"
                           data-role="button"
                           data-icon="arrow-r"
                           data-iconpos="right">#{Semester.getNumber()}
                        </a>

                    </ui:repeat>
                </div>
            </ui:define>

            <ui:define name="footer">
                <!-- EMPTY FOOTER -->
            </ui:define>

        </ui:composition>
    </h:body>
</html>